package com.dolphin.artifact.common.db;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * Created by hhwf on 2017/10/15.
 */
public class DynamicDataSource extends AbstractRoutingDataSource {

    public DynamicDataSource(){

    }

    @Override
    protected Object determineCurrentLookupKey() {
        String lookupKey = DynamicDataSourceHolder.getDataSource();
        return lookupKey;
    }
}
